package custom;

import demo.common.util.PrintUtils;
import org.junit.jupiter.api.extension.AfterEachCallback;
import org.junit.jupiter.api.extension.BeforeEachCallback;
import org.junit.jupiter.api.extension.ExtensionContext;

/**
 * 自定义测试扩展，其实只是为了在每个测试方法前后打印一行标识
 *
 * @author yexi
 */
public class CustomExtension implements BeforeEachCallback, AfterEachCallback {

    @Override
    public void beforeEach(ExtensionContext context) throws Exception {
        PrintUtils.println("测试开始");
    }

    @Override
    public void afterEach(ExtensionContext context) throws Exception {
        PrintUtils.println("测试结束");
    }

}
